package other.Interface_return;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Interface_return_use {
    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        System.out.println(addcontent(list));
    }
    public static List<String> addcontent(List<String> list)
    {
        System.out.println("输入结束作为结束符号");
        list.add(new Scanner(System.in).next());
        while(!(list.get(list.size()-1).equals("结束")))
        {
            list.add(new Scanner(System.in).next());
        }
        list.remove(list.size()-1);
        return list;
    }
}
